<%--
  Created by IntelliJ IDEA.
  User: empty
  Date: 2025/5/23
  Time: 12:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>查询健康信息</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 20px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding: 15px 0;
            border-bottom: 1px solid #dee2e6;
        }

        .header h1 {
            color: #343a40;
            font-size: 28px;
        }

        #logout button {
            background-color: #6c757d;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
            font-size: 14px;
        }

        #logout button:hover {
            background-color: #5a6268;
        }

        #app {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            padding: 30px;
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
            transition: transform 0.3s ease;
        }

        #app:hover {
            transform: translateY(-2px);
        }

        #app h2 {
            color: #343a40;
            font-size: 24px;
            margin-bottom: 25px;
            border-left: 4px solid #4a89dc;
            padding-left: 10px;
        }

        form {
            display: grid;
            grid-gap: 20px;
        }

        label {
            display: flex;
            flex-direction: column;
        }

        label span {
            font-size: 14px;
            color: #6c757d;
            margin-bottom: 8px;
            font-weight: 500;
        }

        input, textarea, select {
            padding: 12px 15px;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: #4a89dc;
        }

        button[type="submit"] {
            background-color: #4a89dc;
            color: white;
            border: none;
            padding: 14px 20px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
            font-size: 16px;
            font-weight: 500;
            margin-top: 10px;
        }

        button[type="submit"]:hover {
            background-color: #3a7bd5;
        }

        .message {
            margin: 20px auto 0;
            padding: 12px;
            border-radius: 5px;
            text-align: center;
            font-size: 14px;
            max-width: 800px;
            width: 100%;
        }

        .message:empty {
            display: none;
        }

        .message:not(:empty) {
            animation: fadeIn 0.5s ease;
        }

        .message.error {
            background-color: #f8d7da;
            color: #721c24;
        }

        .message.success {
            background-color: #d4edda;
            color: #155724;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>
<div class="header">
    <h1>健康信息管理系统</h1>
    <div id="logout">
        <form action="user-community" name="action" method="post">
            <input type="hidden" name="action" value="return">
            <button type="submit">健康信息首页</button>
        </form>
    </div>
</div>

<div id="app">
    <h2>查询健康信息</h2>
    <form action="findInformation" method="post">
        <label>
            <span>健康信息ID:</span>
            <input type="text" name="health_id" placeholder="请输入要查询的健康信息ID">
        </label>
        <button type="submit">查询</button>
    </form>
</div>

<div class="message ${message ? (message.startsWith('成功') ? 'success' : 'error') : ''}">${message}</div>
</body>
</html>
